﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Transports
{
    abstract class Creator
    {
        public abstract AbstractTransport FactoryMethod();
        public abstract AbstractTransport FactoryMethod(uint fare);
        public abstract AbstractTransport FactoryMethod(string name);
        public abstract AbstractTransport FactoryMethod(string name, uint fare);
        public abstract AbstractTransport FactoryMethod(uint fare, string name, uint p3, uint p4);
    }

    class HelicopterCreator : Creator
    {
        public override AbstractTransport FactoryMethod()
        {
            return new Helicopter();
        }

        public override AbstractTransport FactoryMethod(string name)
        {
            return new Helicopter(name, 0);
        }

        public override AbstractTransport FactoryMethod(uint fare)
        {
            return new Helicopter(fare);
        }

        public override AbstractTransport FactoryMethod(string name, uint fare)
        {
            return new Helicopter(name, fare);
        }

        public override AbstractTransport FactoryMethod(uint fare, string name, uint range, uint propellers)
        {
            return new Helicopter(name, fare, range, propellers);
        }

        public AbstractTransport FactoryMethod(uint fare, string name, uint range)
        {
            return new Helicopter(name, fare, range, 0);
        }
    }

    class PlaneCreator : Creator
    {
        public override AbstractTransport FactoryMethod()
        {
            return new Plane();
        }

        public override AbstractTransport FactoryMethod(uint fare)
        {
            return new Plane(fare);
        }

        public override AbstractTransport FactoryMethod(string name)
        {
            return new Plane(name, 0);
        }

        public override AbstractTransport FactoryMethod(string name, uint fare)
        {
            return new Plane(name, fare);
        }

        public override AbstractTransport FactoryMethod(uint fare, string name, uint range, uint propellers)
        {
            return new Plane(name, fare, range, propellers);
        }

        public AbstractTransport FactoryMethod(uint fare, string name, uint range)
        {
            return new Plane(name, fare, range, 0);
        }
    }

    class TruckCreator : Creator
    {
        public override AbstractTransport FactoryMethod()
        {
            return new Truck();
        }

        public override AbstractTransport FactoryMethod(uint fare)
        {
            return new Truck(fare);
        }

        public override AbstractTransport FactoryMethod(string name)
        {
            return new Truck(name, 0);
        }

        public override AbstractTransport FactoryMethod(string name, uint fare)
        {
            return new Truck(name, fare);
        }

        public override AbstractTransport FactoryMethod(uint fare, string name, uint wheels, uint capacity)
        {
            return new Truck(name, fare, wheels, capacity);
        }

        public AbstractTransport FactoryMethod(uint fare, string name, uint wheels)
        {
            return new Plane(name, fare, wheels, 0);
        }
    }

    class PassengerCarCreator : Creator
    {
        public override AbstractTransport FactoryMethod()
        {
            return new PassengerCar();
        }

        public override AbstractTransport FactoryMethod(string str)
        {
            return new PassengerCar(str, 0);
        }

        public override AbstractTransport FactoryMethod(uint fare)
        {
            return new PassengerCar(fare);
        }

        public override AbstractTransport FactoryMethod(string name, uint fare)
        {
            return new PassengerCar(name, fare);
        }

        public override AbstractTransport FactoryMethod(uint fare, string name, uint wheels, uint seats)
        {
            return new PassengerCar(name, fare, wheels, seats);
        }

        public AbstractTransport FactoryMethod(uint fare, string name, uint wheels)
        {
            return new PassengerCar(name, fare, wheels, 0);
        }
    }
}
